/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import DTO.usuarioDTO;
import DAO.garantiasDAO;
import DTO.relacionGarantiaSeguroAutoDTO;
import DTO.relacionGarantiaSeguroCdpDTO;
import DTO.relacionGarantiaSeguroHipoDTO;
import DTO.relacionGarantiaSeguroWarraDTO;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.JOptionPane;

/**
 *
 * @author Luis Olave 10
 */
public class ModificacionRelacionGarantiaSeguro extends javax.swing.JFrame {

    usuarioDTO user;
    garantiasDAO reg = new garantiasDAO();
    String auxNombre = "";
    relacionGarantiaSeguroHipoDTO RelHipo;
    relacionGarantiaSeguroAutoDTO RelAuto;
    relacionGarantiaSeguroWarraDTO RelWarra;
    relacionGarantiaSeguroCdpDTO RelCdp;
    int id;
   
    
    public ModificacionRelacionGarantiaSeguro(usuarioDTO user) {
        this.user = user;
        initComponents();
        this.btnActSeg.setVisible(false);
        this.chkHipoSeg.setSelected(true);
        this.jPanel3.setVisible(false);
        this.jPanel4.setVisible(false);
        this.jPanel5.setVisible(false);
        this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        lblLogo = new javax.swing.JLabel();
        lblIngresoGaraAuto = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel10 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        txtHipoSeg = new javax.swing.JTextField();
        btnHipoSeg = new javax.swing.JButton();
        chkHipoSeg = new javax.swing.JCheckBox();
        jPanel3 = new javax.swing.JPanel();
        txtAutoSeg = new javax.swing.JTextField();
        btnAutoSeg = new javax.swing.JButton();
        chkAutoSeg = new javax.swing.JCheckBox();
        chkWarraSeg = new javax.swing.JCheckBox();
        jPanel4 = new javax.swing.JPanel();
        txtWarraSeg = new javax.swing.JTextField();
        btnWarraSeg = new javax.swing.JButton();
        jPanel5 = new javax.swing.JPanel();
        txtCDPSeg = new javax.swing.JTextField();
        btnCDPSeg = new javax.swing.JButton();
        chkCDPSeg = new javax.swing.JCheckBox();
        pnlDatosPersoGara1 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        txtNombreSeg = new javax.swing.JTextField();
        txtApellMatSeg = new javax.swing.JTextField();
        txtApellPatSeg = new javax.swing.JTextField();
        txtRutSeg = new javax.swing.JTextField();
        btnMenuPrincipal = new javax.swing.JButton();
        jPanel12 = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        pnlDescripGarantia = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        txtDescripcionSeg = new javax.swing.JTextArea();
        lblDescripcion = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        btnActSeg = new javax.swing.JButton();
        jPanel9 = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        txtValorPrimSeg = new javax.swing.JTextField();
        txtCompaniaSeg = new javax.swing.JTextField();
        txtSegCSeg = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        txtPolIndSeg = new javax.swing.JTextField();
        txtMontoAsegSeg = new javax.swing.JTextField();
        cmbPolizaSeg = new javax.swing.JComboBox();
        txtFechaVencimiento = new javax.swing.JTextField();
        btnMenu1 = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("MODIFI. RELACIÓN GARANTÍA SEGURO");
        setResizable(false);

        lblLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/IMAGE/logo.JPG"))); // NOI18N

        lblIngresoGaraAuto.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        lblIngresoGaraAuto.setText("MODIFI. RELACIÓN GARANTÍA - SEGURO");

        jTabbedPane1.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE ROL SII", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnHipoSeg.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnHipoSeg.setText("BUSCAR");
        btnHipoSeg.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnHipoSegActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtHipoSeg)
                    .addComponent(btnHipoSeg, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtHipoSeg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnHipoSeg))
        );

        buttonGroup1.add(chkHipoSeg);
        chkHipoSeg.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkHipoSeg.setText("HIPOTECARIA");
        chkHipoSeg.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkHipoSegActionPerformed(evt);
            }
        });

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE PATENTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnAutoSeg.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnAutoSeg.setText("BUSCAR");
        btnAutoSeg.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAutoSegActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtAutoSeg)
                    .addComponent(btnAutoSeg, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtAutoSeg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnAutoSeg, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        buttonGroup1.add(chkAutoSeg);
        chkAutoSeg.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkAutoSeg.setText("AUTOMOTRIZ");
        chkAutoSeg.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkAutoSegActionPerformed(evt);
            }
        });

        buttonGroup1.add(chkWarraSeg);
        chkWarraSeg.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkWarraSeg.setText("WARRANT");
        chkWarraSeg.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkWarraSegActionPerformed(evt);
            }
        });

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE CÓDIGO ÚNICO (D.U.N 14)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnWarraSeg.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnWarraSeg.setText("BUSCAR");
        btnWarraSeg.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnWarraSegActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtWarraSeg)
                    .addComponent(btnWarraSeg, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(67, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtWarraSeg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnWarraSeg))
        );

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE NUMERO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnCDPSeg.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnCDPSeg.setText("BUSCAR");
        btnCDPSeg.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCDPSegActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtCDPSeg)
                    .addComponent(btnCDPSeg, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtCDPSeg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnCDPSeg))
        );

        buttonGroup1.add(chkCDPSeg);
        chkCDPSeg.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkCDPSeg.setText("CDP");
        chkCDPSeg.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkCDPSegActionPerformed(evt);
            }
        });

        pnlDatosPersoGara1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DATOS PERSONALES GARANTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel36.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel36.setText("RUT");

        jLabel37.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel37.setText("APELLIDO PATERNO");

        jLabel39.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel39.setText("APELLIDO MATERNO");

        jLabel40.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel40.setText("NOMBRE");

        txtNombreSeg.setBackground(new java.awt.Color(255, 255, 102));
        txtNombreSeg.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtNombreSeg.setEnabled(false);

        txtApellMatSeg.setBackground(new java.awt.Color(255, 255, 102));
        txtApellMatSeg.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellMatSeg.setEnabled(false);

        txtApellPatSeg.setBackground(new java.awt.Color(255, 255, 102));
        txtApellPatSeg.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellPatSeg.setEnabled(false);

        txtRutSeg.setBackground(new java.awt.Color(255, 255, 102));
        txtRutSeg.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtRutSeg.setEnabled(false);

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel37)
                    .addComponent(jLabel36))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtRutSeg, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtApellPatSeg, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 73, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel39)
                    .addComponent(jLabel40))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtApellMatSeg, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtNombreSeg, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(196, 196, 196))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel36)
                    .addComponent(txtRutSeg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel40)
                    .addComponent(txtNombreSeg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(txtApellPatSeg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel39)
                    .addComponent(txtApellMatSeg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout pnlDatosPersoGara1Layout = new javax.swing.GroupLayout(pnlDatosPersoGara1);
        pnlDatosPersoGara1.setLayout(pnlDatosPersoGara1Layout);
        pnlDatosPersoGara1Layout.setHorizontalGroup(
            pnlDatosPersoGara1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDatosPersoGara1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlDatosPersoGara1Layout.setVerticalGroup(
            pnlDatosPersoGara1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDatosPersoGara1Layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        btnMenuPrincipal.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnMenuPrincipal.setText("MENÚ PRINCIPAL");
        btnMenuPrincipal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPrincipalActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlDatosPersoGara1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel10Layout.createSequentialGroup()
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(chkHipoSeg)
                                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(chkAutoSeg)
                                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(26, 26, 26)
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(chkWarraSeg))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(chkCDPSeg)
                                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(btnMenuPrincipal, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(chkWarraSeg)
                    .addComponent(chkCDPSeg)
                    .addComponent(chkAutoSeg)
                    .addComponent(chkHipoSeg))
                .addGap(18, 18, 18)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(36, 36, 36)
                .addComponent(pnlDatosPersoGara1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 125, Short.MAX_VALUE)
                .addComponent(btnMenuPrincipal)
                .addGap(65, 65, 65))
        );

        jTabbedPane1.addTab("INFO. GARANTE", jPanel10);

        pnlDescripGarantia.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DESCRIPCIÓN GARANTIA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtDescripcionSeg.setBackground(new java.awt.Color(255, 255, 102));
        txtDescripcionSeg.setColumns(20);
        txtDescripcionSeg.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtDescripcionSeg.setRows(5);
        txtDescripcionSeg.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtDescripcionSeg.setEnabled(false);
        jScrollPane4.setViewportView(txtDescripcionSeg);

        lblDescripcion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblDescripcion.setText("DESCRIPCIÓN");

        javax.swing.GroupLayout pnlDescripGarantiaLayout = new javax.swing.GroupLayout(pnlDescripGarantia);
        pnlDescripGarantia.setLayout(pnlDescripGarantiaLayout);
        pnlDescripGarantiaLayout.setHorizontalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDescripGarantiaLayout.createSequentialGroup()
                .addGap(70, 70, 70)
                .addComponent(lblDescripcion)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 566, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlDescripGarantiaLayout.setVerticalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDescripGarantiaLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblDescripcion)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(367, 367, 367))
        );

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.PREFERRED_SIZE, 359, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(97, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 795, Short.MAX_VALUE)
            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 489, Short.MAX_VALUE)
            .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()))
        );

        jTabbedPane1.addTab("DESCRIP. GARANTÍA", jPanel12);

        btnActSeg.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnActSeg.setText("ACTUALIZAR");
        btnActSeg.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnActSegActionPerformed(evt);
            }
        });

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "MODIFI. RELACIÓN GARANTÍA SEGURO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel2.setText("TIPO DE POLIZA");

        jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel3.setText("MONTO ASEGURADO");

        jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel4.setText("COMPAÑIA");

        jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel5.setText("VALOR PRIMA");

        jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel6.setText("SEGURO COLECTIVO");

        jLabel7.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel7.setText("PÓLIZA INDIVIDUAL");

        jLabel8.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel8.setText("FECH. VENCIMIENTO");

        txtMontoAsegSeg.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtMontoAsegSegActionPerformed(evt);
            }
        });

        cmbPolizaSeg.setFont(new java.awt.Font("Century Gothic", 0, 10)); // NOI18N
        cmbPolizaSeg.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione", "Incendio", "Robo" }));

        txtFechaVencimiento.setBackground(new java.awt.Color(255, 255, 102));
        txtFechaVencimiento.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtFechaVencimiento.setEnabled(false);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3)
                    .addComponent(jLabel6))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(txtMontoAsegSeg)
                        .addComponent(cmbPolizaSeg, 0, 150, Short.MAX_VALUE))
                    .addComponent(txtSegCSeg, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 169, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addComponent(jLabel4))
                        .addGap(52, 52, 52)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtValorPrimSeg)
                            .addComponent(txtCompaniaSeg)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel8)
                            .addComponent(jLabel7))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtFechaVencimiento)
                            .addComponent(txtPolIndSeg, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtCompaniaSeg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtValorPrimSeg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel5)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(cmbPolizaSeg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(txtMontoAsegSeg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(3, 3, 3)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(txtSegCSeg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7)
                    .addComponent(txtPolIndSeg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(9, 9, 9)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(txtFechaVencimiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(230, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        btnMenu1.setText("MENÚ PRINCIPAL");
        btnMenu1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenu1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addComponent(btnActSeg)
                        .addGap(184, 184, 184)
                        .addComponent(btnMenu1, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(30, Short.MAX_VALUE))
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnMenu1)
                    .addComponent(btnActSeg))
                .addGap(62, 62, 62))
        );

        jTabbedPane1.addTab("MODIFI. RELACIÓN GTÍA. - SEGURO", jPanel13);

        jLabel1.setText("MENÚ PRINCIPAL\\MODIFICACIÓN RELACIÓN GARANTÍA SEGURO");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblLogo)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(114, 114, 114)
                        .addComponent(lblIngresoGaraAuto))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel1)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addComponent(jTabbedPane1)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblIngresoGaraAuto)
                    .addComponent(lblLogo)
                    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(18, 18, 18)
                .addComponent(jTabbedPane1))
        );

        setSize(new java.awt.Dimension(816, 660));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnMenuPrincipalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPrincipalActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        ModificacionRelacionGarantiaSeguro.this.dispose();
    }//GEN-LAST:event_btnMenuPrincipalActionPerformed

    private void btnHipoSegActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnHipoSegActionPerformed
        
        if(this.txtHipoSeg.getText().length() == 0)
        {
           javax.swing.JOptionPane.showMessageDialog(this, "Ingrese un Rol valido");
           this.txtHipoSeg.setText(null);
           this.txtAutoSeg.setText(null);
           this.txtWarraSeg.setText(null);
           this.txtCDPSeg.setText(null);
           limpiar2();
        }
        else{
        RelHipo = reg.BuscarRelacionSeguroHipo(this.txtHipoSeg.getText());
        if(RelHipo.getId_gara_seg() == 0)
        {
           javax.swing.JOptionPane.showMessageDialog(this, "Garantia no encontrada");
           this.txtHipoSeg.setText(null);
           this.txtAutoSeg.setText(null);
           this.txtWarraSeg.setText(null);
           this.txtCDPSeg.setText(null);
           limpiar2();
           
        }else{
            this.txtRutSeg.setText(RelHipo.getHipo().getRut_gara_hipo());
            this.txtApellPatSeg.setText(RelHipo.getHipo().getApell_paterno_hipo());
            this.txtApellMatSeg.setText(RelHipo.getHipo().getApell_materno_hipo());
//            this.txtFolioGarSeg.setText(String.valueOf(RelHipo.getHipo().getFolio_garantia_hipo()));
            this.txtNombreSeg.setText(RelHipo.getHipo().getNombre_hipo());
            this.txtDescripcionSeg.setText(RelHipo.getHipo().getDescrip_hipo());
            this.cmbPolizaSeg.setSelectedItem(RelHipo.getTipo_poliza_gara_seg());
            this.txtMontoAsegSeg.setText(String.valueOf(RelHipo.getMonto_aseg_gara_seg()));
            this.txtSegCSeg.setText(RelHipo.getSeguro_cole_gara_seg());
            this.txtCompaniaSeg.setText(RelHipo.getCompania_gara_seg());
            this.txtValorPrimSeg.setText(String.valueOf(RelHipo.getValor_prima_gara_seg()));
            this.txtPolIndSeg.setText(String.valueOf(RelHipo.getPoliza_indiv_gara_seg()));
            Date aux = DTO.ConversionFechas.convertToDate(RelHipo.getFech_venci_gara_seg());     
            SimpleDateFormat formate = new SimpleDateFormat("dd/MM/yyyy");        
            this.txtFechaVencimiento.setText(formate.format(aux));
            this.btnActSeg.setVisible(true);
            this.txtAutoSeg.setText(null);
            this.txtWarraSeg.setText(null);
            this.txtCDPSeg.setText(null);
            auxNombre = "Hipotecaria";
            id= RelHipo.getId_gara_seg();
        }
            }
    }//GEN-LAST:event_btnHipoSegActionPerformed

    private void btnAutoSegActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAutoSegActionPerformed
        if(this.txtAutoSeg.getText().length() == 0)
        {
           javax.swing.JOptionPane.showMessageDialog(this, "Ingrese una Patente valida");
           this.txtHipoSeg.setText(null);
           this.txtAutoSeg.setText(null);
           this.txtWarraSeg.setText(null);
           this.txtCDPSeg.setText(null);
           limpiar2();
        }
        else{
        RelAuto = reg.BuscarRelacionSeguroAuto(this.txtAutoSeg.getText());
        if(RelAuto.getId_gara_seg() == 0)
        {
           javax.swing.JOptionPane.showMessageDialog(this, "Garantia no encontrada");
           this.txtHipoSeg.setText(null);
           this.txtAutoSeg.setText(null);
           this.txtWarraSeg.setText(null);
           this.txtCDPSeg.setText(null);
           limpiar2();
           
        }else{
            this.txtRutSeg.setText(RelAuto.getAuto().getRut_gara_auto());
            this.txtApellPatSeg.setText(RelAuto.getAuto().getApell_paterno_auto());
            this.txtApellMatSeg.setText(RelAuto.getAuto().getApell_materno_auto());
//            this.txtFolioGarSeg.setText(String.valueOf(RelAuto.getAuto().getFolio_garantia_auto()));
            this.txtNombreSeg.setText(RelAuto.getAuto().getNombre_auto());
            this.txtDescripcionSeg.setText(RelAuto.getAuto().getDescrip_auto());
            this.cmbPolizaSeg.setSelectedItem(RelAuto.getTipo_poliza_gara_seg());
            this.txtMontoAsegSeg.setText(String.valueOf(RelAuto.getMonto_aseg_gara_seg()));
            this.txtSegCSeg.setText(RelAuto.getSeguro_cole_gara_seg());
            this.txtCompaniaSeg.setText(RelAuto.getCompania_gara_seg());
            this.txtValorPrimSeg.setText(String.valueOf(RelAuto.getValor_prima_gara_seg()));
            this.txtPolIndSeg.setText(String.valueOf(RelAuto.getPoliza_indiv_gara_seg()));
            Date aux = DTO.ConversionFechas.convertToDate(RelAuto.getFech_venci_gara_seg());
            SimpleDateFormat formate = new SimpleDateFormat("dd/MM/yyyy");        
            this.txtFechaVencimiento.setText(formate.format(aux));
            this.txtHipoSeg.setText(null);
           this.txtWarraSeg.setText(null);
           this.txtCDPSeg.setText(null);
           this.btnActSeg.setVisible(true);
            auxNombre = "Automotriz";
            id= RelAuto.getId_gara_seg();
        }
        }
    }//GEN-LAST:event_btnAutoSegActionPerformed

    private void btnWarraSegActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnWarraSegActionPerformed
        if(this.txtWarraSeg.getText().length() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "Ingrese un DUN valido");
                this.txtHipoSeg.setText(null);
                this.txtAutoSeg.setText(null);
                this.txtWarraSeg.setText(null);
                this.txtCDPSeg.setText(null);
                limpiar2();
            }
        else{
            RelWarra = reg.BuscarRelacionSeguroWarra(this.txtWarraSeg.getText().trim());
            if(RelWarra.getId_gara_seg() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "Garantia no encontrada");
                this.txtHipoSeg.setText(null);
                this.txtAutoSeg.setText(null);
                this.txtWarraSeg.setText(null);
                this.txtCDPSeg.setText(null);
                limpiar2();
                
            }else{
            this.txtRutSeg.setText(RelWarra.getWarra().getRut_garante_warra());
            this.txtApellPatSeg.setText(RelWarra.getWarra().getApell_paterno_warra());
            this.txtApellMatSeg.setText(RelWarra.getWarra().getApell_materno_warra());
//            this.txtFolioGarSeg.setText(String.valueOf(RelWarra.getWarra().getFolio_warra()));
            this.txtNombreSeg.setText(RelWarra.getWarra().getNombre_warra());
            this.txtDescripcionSeg.setText(RelWarra.getWarra().getDescrip_warra());   
            this.cmbPolizaSeg.setSelectedItem(RelWarra.getTipo_poliza_gara_seg());
            this.txtMontoAsegSeg.setText(String.valueOf(RelWarra.getMonto_aseg_gara_seg()));
            this.txtSegCSeg.setText(RelWarra.getSeguro_cole_gara_seg());
            this.txtCompaniaSeg.setText(RelWarra.getCompania_gara_seg());
            this.txtValorPrimSeg.setText(String.valueOf(RelWarra.getValor_prima_gara_seg()));
            this.txtPolIndSeg.setText(String.valueOf(RelWarra.getPoliza_indiv_gara_seg()));
            Date aux = DTO.ConversionFechas.convertToDate(RelWarra.getFech_venci_gara_seg());
            SimpleDateFormat formate = new SimpleDateFormat("dd/MM/yyyy");        
            this.txtFechaVencimiento.setText(formate.format(aux));
            this.txtHipoSeg.setText(null);
           this.txtAutoSeg.setText(null);         
           this.txtCDPSeg.setText(null);
           this.btnActSeg.setVisible(true);
            auxNombre = "Warrant";
            id= RelWarra.getId_gara_seg();
            }
        }
    }//GEN-LAST:event_btnWarraSegActionPerformed

    private void btnCDPSegActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCDPSegActionPerformed
         if (!this.txtCDPSeg.getText().matches("[ 0-9]*")) // expresiones regulares para validar
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese solo números");
            this.txtHipoSeg.setText(null);
                this.txtAutoSeg.setText(null);
                this.txtWarraSeg.setText(null);
                this.txtCDPSeg.setText(null);
                limpiar2();
         }
         else
         {
        if(this.txtCDPSeg.getText().length() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "Ingrese un Numero valido");
                this.txtHipoSeg.setText(null);
                this.txtAutoSeg.setText(null);
                this.txtWarraSeg.setText(null);
                this.txtCDPSeg.setText(null);
                limpiar2();
            }
        else{
            RelCdp = reg.BuscarRelacionSeguroCdp(Integer.parseInt(this.txtCDPSeg.getText().trim()));
            if(RelCdp.getId_gara_seg() == 0)
            {
                javax.swing.JOptionPane.showMessageDialog(this, "Garantia No Encontrada");
                this.txtHipoSeg.setText(null);
                this.txtAutoSeg.setText(null);
                this.txtWarraSeg.setText(null);
                this.txtCDPSeg.setText(null);
                limpiar2();
           
            }else{
            this.txtRutSeg.setText(RelCdp.getCdp().getRut_gara_cdp());
            this.txtApellPatSeg.setText(RelCdp.getCdp().getApell_paterno_cdp());
            this.txtApellMatSeg.setText(RelCdp.getCdp().getApell_materno_cdp());
//            this.txtFolioGarSeg.setText(String.valueOf(RelCdp.getCdp().getFolio_cdp()));
            this.txtNombreSeg.setText(RelCdp.getCdp().getNombre_cdp());
            this.txtDescripcionSeg.setText(RelCdp.getCdp().getDescrip_cdp());
            this.cmbPolizaSeg.setSelectedItem(RelCdp.getTipo_poliza_gara_seg());
            this.txtMontoAsegSeg.setText(String.valueOf(RelCdp.getMonto_aseg_gara_seg()));
            this.txtSegCSeg.setText(RelCdp.getSeguro_cole_gara_seg());
            this.txtCompaniaSeg.setText(RelCdp.getCompania_gara_seg());
            this.txtValorPrimSeg.setText(String.valueOf(RelCdp.getValor_prima_gara_seg()));
            this.txtPolIndSeg.setText(String.valueOf(RelCdp.getPoliza_indiv_gara_seg()));
            Date aux = DTO.ConversionFechas.convertToDate(RelCdp.getFech_venci_gara_seg());
            SimpleDateFormat formate = new SimpleDateFormat("dd/MM/yyyy");        
            this.txtFechaVencimiento.setText(formate.format(aux));
            this.txtHipoSeg.setText(null);
           this.txtAutoSeg.setText(null);
           this.txtWarraSeg.setText(null);
           this.btnActSeg.setVisible(true);
            auxNombre = "CDP";
            id= RelCdp.getId_gara_seg();
            }
        }}
    }//GEN-LAST:event_btnCDPSegActionPerformed

    private void btnActSegActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActSegActionPerformed
        switch(auxNombre)
        {
            case "Hipotecaria":
                if (!cmbPolizaSeg.getSelectedItem().equals("Seleccione")) {
                    RelHipo.setTipo_poliza_gara_seg(cmbPolizaSeg.getSelectedItem().toString());
                }
                if (!txtMontoAsegSeg.getText().equals("")) {
                    RelHipo.setMonto_aseg_gara_seg(Integer.parseInt(txtMontoAsegSeg.getText().trim()));
                }
                if (!txtSegCSeg.getText().equals("")) {
                    RelHipo.setSeguro_cole_gara_seg(txtSegCSeg.getText().trim());
                }
                if (!txtCompaniaSeg.getText().equals("")) {
                    RelHipo.setCompania_gara_seg(txtCompaniaSeg.getText().trim());
                }
                if (!txtValorPrimSeg.getText().equals("")) {
                    RelHipo.setValor_prima_gara_seg(Integer.parseInt(txtValorPrimSeg.getText().trim()));
                }
                if (!txtPolIndSeg.getText().equals("")) {
                    RelHipo.setPoliza_indiv_gara_seg(Integer.parseInt(txtPolIndSeg.getText().trim()));
                }
                
//                RelHipo.setFech_venci_gara_seg(new SimpleDateFormat("dd/MM/yyyy").format(jcFechaVencimiento.getDate()));
                RelHipo.setId_gara_seg(id);
                int respuesta = javax.swing.JOptionPane.showConfirmDialog(null, "Se grabara la Relacion Garantia:", "Operacion", JOptionPane.OK_CANCEL_OPTION);
                if (respuesta == 0) {
                    reg.modificacionRelGarantiaSeguroHipo(RelHipo);
                    javax.swing.JOptionPane.showMessageDialog(null, "Actualizacion Exitosa!");
                    limpiar2();
                   }
                else
                {
                    
                }
                break;
                case "Automotriz":
                if (!cmbPolizaSeg.getSelectedItem().equals("Seleccione")) {
                    RelAuto.setTipo_poliza_gara_seg(cmbPolizaSeg.getSelectedItem().toString());
                }
                if (!txtMontoAsegSeg.getText().equals("")) {
                    RelAuto.setMonto_aseg_gara_seg(Integer.parseInt(txtMontoAsegSeg.getText().trim()));
                }
                if (!txtSegCSeg.getText().equals("")) {
                    RelAuto.setSeguro_cole_gara_seg(txtSegCSeg.getText().trim());
                }
                if (!txtCompaniaSeg.getText().equals("")) {
                    RelAuto.setCompania_gara_seg(txtCompaniaSeg.getText().trim());
                }
                if (!txtValorPrimSeg.getText().equals("")) {
                    RelAuto.setValor_prima_gara_seg(Integer.parseInt(txtValorPrimSeg.getText().trim()));
                }
                if (!txtPolIndSeg.getText().equals("")) {
                    RelAuto.setPoliza_indiv_gara_seg(Integer.parseInt(txtPolIndSeg.getText().trim()));
                }
                
//                RelAuto.setFech_venci_gara_seg(new SimpleDateFormat("dd/MM/yyyy").format(jcFechaVencimiento.getDate()));
                RelAuto.setId_gara_seg(id);
                int respuesta2 = javax.swing.JOptionPane.showConfirmDialog(null, "Se grabara la Relacion Garantia:", "Operacion", JOptionPane.OK_CANCEL_OPTION);
                if (respuesta2 == 0) {
                    reg.modificacionRelGarantiaSeguroAuto(RelAuto);
                    javax.swing.JOptionPane.showMessageDialog(null, "Actualizacion Exitosa!");
                    limpiar2();
                   }
                else
                {
                    
                }
                break;
                 case "Warrant":
                if (!cmbPolizaSeg.getSelectedItem().equals("Seleccione")) {
                    RelWarra.setTipo_poliza_gara_seg(cmbPolizaSeg.getSelectedItem().toString());
                }
                if (!txtMontoAsegSeg.getText().equals("")) {
                    RelWarra.setMonto_aseg_gara_seg(Integer.parseInt(txtMontoAsegSeg.getText().trim()));
                }
                if (!txtSegCSeg.getText().equals("")) {
                    RelWarra.setSeguro_cole_gara_seg(txtSegCSeg.getText().trim());
                }
                if (!txtCompaniaSeg.getText().equals("")) {
                    RelWarra.setCompania_gara_seg(txtCompaniaSeg.getText().trim());
                }
                if (!txtValorPrimSeg.getText().equals("")) {
                    RelWarra.setValor_prima_gara_seg(Integer.parseInt(txtValorPrimSeg.getText().trim()));
                }
                if (!txtPolIndSeg.getText().equals("")) {
                    RelWarra.setPoliza_indiv_gara_seg(Integer.parseInt(txtPolIndSeg.getText().trim()));
                }
                
//                RelWarra.setFech_venci_gara_seg(new SimpleDateFormat("dd/MM/yyyy").format(jcFechaVencimiento.getDate()));
                RelWarra.setId_gara_seg(id);
                int respuesta3 = javax.swing.JOptionPane.showConfirmDialog(null, "Se grabara la Relacion Garantia:", "Operacion", JOptionPane.OK_CANCEL_OPTION);
                if (respuesta3 == 0) {
                    reg.modificacionRelGarantiaSeguroWarra(RelWarra);
                    javax.swing.JOptionPane.showMessageDialog(null, "Actualizacion Exitosa!");
                    limpiar2();
                   }
                else
                {
                    
                }
                break;
               case "CDP":
                if (!cmbPolizaSeg.getSelectedItem().equals("Seleccione")) {
                    RelCdp.setTipo_poliza_gara_seg(cmbPolizaSeg.getSelectedItem().toString());
                }
                if (!txtMontoAsegSeg.getText().equals("")) {
                    RelCdp.setMonto_aseg_gara_seg(Integer.parseInt(txtMontoAsegSeg.getText().trim()));
                }
                if (!txtSegCSeg.getText().equals("")) {
                    RelCdp.setSeguro_cole_gara_seg(txtSegCSeg.getText().trim());
                }
                if (!txtCompaniaSeg.getText().equals("")) {
                    RelCdp.setCompania_gara_seg(txtCompaniaSeg.getText().trim());
                }
                if (!txtValorPrimSeg.getText().equals("")) {
                    RelCdp.setValor_prima_gara_seg(Integer.parseInt(txtValorPrimSeg.getText().trim()));
                }
                if (!txtPolIndSeg.getText().equals("")) {
                    RelCdp.setPoliza_indiv_gara_seg(Integer.parseInt(txtPolIndSeg.getText().trim()));
                }
                
//                RelCdp.setFech_venci_gara_seg(new SimpleDateFormat("dd/MM/yyyy").format(jcFechaVencimiento.getDate()));
                RelCdp.setId_gara_seg(id);
                int respuesta4 = javax.swing.JOptionPane.showConfirmDialog(null, "Se grabara la Relacion Garantia:", "Operacion", JOptionPane.OK_CANCEL_OPTION);
                if (respuesta4 == 0) {
                    reg.modificacionRelGarantiaSeguroCdp(RelCdp);
                    javax.swing.JOptionPane.showMessageDialog(null, "Actualizacion Exitosa!");
                    limpiar2();
                   }
                else
                {
                    
                }
                break;   
        }
    }//GEN-LAST:event_btnActSegActionPerformed

    private void txtMontoAsegSegActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtMontoAsegSegActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtMontoAsegSegActionPerformed

    private void btnMenu1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenu1ActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        ModificacionRelacionGarantiaSeguro.this.dispose();
    }//GEN-LAST:event_btnMenu1ActionPerformed

    private void chkHipoSegActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkHipoSegActionPerformed
        if(this.chkHipoSeg.isSelected())
        {
            jPanel2.setVisible(true);
            jPanel3.setVisible(false);
            jPanel4.setVisible(false);
            jPanel5.setVisible(false);
        }
    }//GEN-LAST:event_chkHipoSegActionPerformed

    private void chkAutoSegActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkAutoSegActionPerformed
        if(this.chkAutoSeg.isSelected())
        {
            jPanel2.setVisible(false);
            jPanel3.setVisible(true);
            jPanel4.setVisible(false);
            jPanel5.setVisible(false);
        }
    }//GEN-LAST:event_chkAutoSegActionPerformed

    private void chkWarraSegActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkWarraSegActionPerformed
        if(this.chkWarraSeg.isSelected())
        {
            jPanel2.setVisible(false);
            jPanel3.setVisible(false);
            jPanel4.setVisible(true);
            jPanel5.setVisible(false);
        }
    }//GEN-LAST:event_chkWarraSegActionPerformed

    private void chkCDPSegActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkCDPSegActionPerformed
        if(this.chkCDPSeg.isSelected())
        {
            jPanel2.setVisible(false);
            jPanel3.setVisible(false);
            jPanel4.setVisible(false);
            jPanel5.setVisible(true);
        }
    }//GEN-LAST:event_chkCDPSegActionPerformed

    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        /*
//         * Set the Nimbus look and feel
//         */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /*
//         * If Nimbus (introduced in Java SE 6) is not available, stay with the
//         * default look and feel. For details see
//         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
//         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(ModificacionRelacionGarantiaSeguro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(ModificacionRelacionGarantiaSeguro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(ModificacionRelacionGarantiaSeguro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(ModificacionRelacionGarantiaSeguro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /*
//         * Create and display the form
//         */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new ModificacionRelacionGarantiaSeguro().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnActSeg;
    private javax.swing.JButton btnAutoSeg;
    private javax.swing.JButton btnCDPSeg;
    private javax.swing.JButton btnHipoSeg;
    private javax.swing.JButton btnMenu1;
    private javax.swing.JButton btnMenuPrincipal;
    private javax.swing.JButton btnWarraSeg;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JCheckBox chkAutoSeg;
    private javax.swing.JCheckBox chkCDPSeg;
    private javax.swing.JCheckBox chkHipoSeg;
    private javax.swing.JCheckBox chkWarraSeg;
    private javax.swing.JComboBox cmbPolizaSeg;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JLabel lblDescripcion;
    private javax.swing.JLabel lblIngresoGaraAuto;
    private javax.swing.JLabel lblLogo;
    private javax.swing.JPanel pnlDatosPersoGara1;
    private javax.swing.JPanel pnlDescripGarantia;
    private javax.swing.JTextField txtApellMatSeg;
    private javax.swing.JTextField txtApellPatSeg;
    private javax.swing.JTextField txtAutoSeg;
    private javax.swing.JTextField txtCDPSeg;
    private javax.swing.JTextField txtCompaniaSeg;
    private javax.swing.JTextArea txtDescripcionSeg;
    private javax.swing.JTextField txtFechaVencimiento;
    private javax.swing.JTextField txtHipoSeg;
    private javax.swing.JTextField txtMontoAsegSeg;
    private javax.swing.JTextField txtNombreSeg;
    private javax.swing.JTextField txtPolIndSeg;
    private javax.swing.JTextField txtRutSeg;
    private javax.swing.JTextField txtSegCSeg;
    private javax.swing.JTextField txtValorPrimSeg;
    private javax.swing.JTextField txtWarraSeg;
    // End of variables declaration//GEN-END:variables

    private void limpiar2() {
            this.txtRutSeg.setText(null);
            this.txtApellPatSeg.setText(null);
            this.txtApellMatSeg.setText(null);
//            this.txtFolioGarSeg.setText(null);
            this.txtNombreSeg.setText(null);
            this.txtDescripcionSeg.setText(null);
            this.cmbPolizaSeg.setSelectedItem("Seleccione");
            this.txtMontoAsegSeg.setText(null);
            this.txtSegCSeg.setText(null);
            this.txtCompaniaSeg.setText(null);
            this.txtValorPrimSeg.setText(null);
            this.txtPolIndSeg.setText(null);
            this.txtFechaVencimiento.setText(null);
            this.btnActSeg.setVisible(false);
    }
}
